/****************************************
Table A.2 
****************************************/

* Load Data
use "$dir/Data/Original/Census_married_1900_30.dta", clear

* Duplicates
duplicates tag histid year, gen(isdup)
drop if isdup
drop isdup

merge 1:1 histid year using "$dir/Data/Original/MR_Census_Linked_histids.dta"
gen matched = _merge == 3
drop _merge


* Prepare Data for Balance Tables
replace agemarr = . if agemarr == 0
gen ln_occscore = log(occscore)
gen ln_citypop = ln(citypop)
gen mult_genh =  multgend >= 22
replace mult_genh = . if multgend == .

gen farm_a = farm == 2
gen urban_a = urban == 2 
drop farm urban
rename farm_a farm
rename urban_a urban

label var age "Age"
label var agemarr "Age of Marriage"
label var ln_occscore "Income (log occscore)"
label var ln_citypop "Urbanization (log residence pop'n)"
label var urban "Urban"
label var farm "Farm"
label var famsize "Family Size"
label var ncouples "Number of couples (in unit)"
label var mult_genh "Multigenerational HH"

dmout age agemarr ln_occscore ln_citypop ///
      urban farm famsize ncouples mult_genh using mr_census_linked_nonlinked, by(matched) tex list replace
* For the mean values (not the differences), we report standard deviations, and not standard errors which would be the default output from the dmout command. 

